package com.yihuu.service;

import com.yihuu.common.Result;
import com.yihuu.entity.User;

/**
 * Created by yuhui on 2017/8/15.
 */
public interface UserService {

    /**
     * 用户登录
     * @param uname
     * @param upwd
     * @return
     */
    public Result login(String uname, String upwd);

    /**
     * 用于ajax用户名,密码后台验证
     * @param type
     * @return
     */
    public Boolean checkColumn(String type,String uname,String uphone);

    /**
     * 用户注册
     * @param user
     * @return
     */
    public Result register(User user);

    /**
     * 获得用户问题
     * @param uanme
     * @return
     */
    public Result getQuestion(String uanme);

    /**
     * 忘记密码，验证问题和答案
     * @param uname
     * @param question
     * @return
     */
    Result lossPassword(String uname ,String question,String answer);

    /**
     * 忘记密码，通过问题和答案修改密码
     * @param uname
     * @param question
     * @param password
     * @return
     */
    Result lossPassword(String uname ,String question,String answer,String password);

    Result updateInfo(User user);

    Result setQuestion(User user);
}
